#pragma once
#include "irrlicht.h"
#include "Camera.h"
#include "Menu.h"
#include "Cursor.h"
#include <iostream>


enum EVENTS{
	// Wiimote
	EVENT_WIIMOTE_A=0,
	EVENT_WIIMOTE_A_RELEASED,
	EVENT_WIIMOTE_B,
	EVENT_WIIMOTE_UP,
	EVENT_WIIMOTE_DOWN,
	EVENT_WIIMOTE_LEFT,
	EVENT_WIIMOTE_RIGHT,
	EVENT_WIIMOTE_PLUS,
	EVENT_WIIMOTE_MINUS,
	EVENT_WIIMOTE_1,
	EVENT_WIIMOTE_2,
	EVENT_WIIMOTE_HOME,

	// Nunchuk
	EVENT_NUNCHUK_JOYSTICK_X,
	EVENT_NUNCHUK_JOYSTICK_Y,
	EVENT_NUNCHUK_JOYSTICK_C,
	EVENT_NUNCHUK_JOYSTICK_Z,

	// Lunettes
	EVENT_IWR_ROT_PITCH,
	EVENT_IWR_ROT_YAW,

    // Interaction avec l'interface
    EVENT_MENU_TOGGLE_MAIN_MENU,
    EVENT_MENU_TOGGLE_QUICK_MENU,
    EVENT_MENU_QUIT,

	// Systeme
	EVENT_SYSTEM_QUIT
};

/*
Exemple de manipluation de curseur (windows.h)
    HWND hwnd;
    POINT pt;
    GetCursorPos(&pt);
    ScreenToClient(hwnd, &pt);
    pt.x+=1;
    ClientToScreen(hwnd, &pt);
    SetCursorPos(pt.x, pt.y);

*/
class Menu;
class EventManager : public irr::IEventReceiver{

	public :
		EventManager(irr::IrrlichtDevice *device, Menu *menu, Camera *camera, Cursor * cursor);
		bool OnEvent(const irr::SEvent &event);


	private :
		irr::IrrlichtDevice *evt_device;
		Menu *evt_menu;
		Camera *evt_camera;
		Cursor * cursor;

};
